package edu.mtu.citizenscience.ethnography.uploader;

import org.json.JSONObject;

interface EthnographyResponseHandler {
	
	/**
	 * Processes a successful response
	 * @param json A JSONObject containing the response data. Must not be null.
	 */
	public void onSuccess(JSONObject json);
	
	/**
	 * Processes a result specifying a server error (i.e. HTTP 5XX)
	 * @param json A JSONObject containing response/diagnostic data. May be null.
	 */
	public void onError(JSONObject json);
	
	/**
	 * Processes a result specifying a client error (i.e. HTTP 4XX)
	 * @param json A JSONObject containing response/diagnostic data. May be null.
	 */
	public void onFailure(JSONObject json);
	
	/**
	 * Processes a result specifying a failure to connect to the server.
	 * @param json A JSONObject containing response/diagnostic data. May be null.
	 */
	public void onNoResponse(JSONObject json);
}
